%% -*- mode: erlang -*-
[

 {exometer_core, [{predefined, [
    {[erlang, memory], {function, erlang, memory, [], value, []}, []},
    {[erlang, system_info], {function, erlang, system_info, ['$dp'], value, [process_count]}, []},
    {[erlang, statistics], {function, erlang, statistics, ['$dp'], value, [run_queue]}, []},
    {[erlang, io], {function, erlang, statistics, [io], match, {{'_', input}, {'_', output}}}, []}
   ]}
 ]},

 {mnesia, [
    {dir, "priv/mnesia"}
 ]},

 {lager,
  [{handlers,
    [
      {lager_console_backend, [
        {level, info},
        {formatter, lager_default_formatter},
        {formatter_config, [time, color, " [", severity, "] ", {site, [site, " "], ""}, {module, [module, ":", line, " "], ""}, message, "\n"]}
      ]},
      {lager_file_backend, [
        {file, "priv/log/error.log"},
        {level, error},
        {formatter, lager_default_formatter},
        {formatter_config, [date, " ", time, " [", severity, "] ", {site, [site, " "], ""}, {pid, ""}, {module, [{pid, ["@"], ""}, module, {function, [":", function], ""}, {line, [":", line], ""}], ""}, " ", message, "\n"] }
      ]},
      {lager_file_backend, [
        {file, "priv/log/console.log"},
        {level, info},
        {formatter, lager_default_formatter},
        {formatter_config, [date, " ", time, " [", severity, "] ", {site, [site, " "], ""}, {pid, ""}, {module, [{pid, ["@"], ""}, module, {function, [":", function], ""}, {line, [":", line], ""}], ""}, " ", message, "\n"] }
      ]}
    ]},
   {crash_log, "priv/log/crash.log"}
  ]},

  %% SSL application configuration.
  %%
  %% For details see: http://erlang.org/doc/man/ssl_app.html
  {ssl,
   [
      %% The max number of cached SSL parameters. Increase if you have a lot of clients
      %% connecting to your server.
      {session_cache_server_max, 20000},

      %% The amount of time the parameters are cached. (in seconds).
      {session_lifetime, 300}, % 5 minutes

      %% The time between pem cache cleanups (in milliseconds)
      {ssl_pem_cache_clean, 300000} % 5 minutes
   ]},

  {filezcache,
   [
      {data_dir, "priv/filezcache/data"},
      {journal_dir, "priv/filezcache/journal"}
   ]},

 {setup,
  [
   {data_dir, "priv/data"},
   {log_dir,  "priv/log"}
  ]}

].
